package cn.wolfcode.cms.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Setter
@Getter
//会员信息
public class Member {
    private static final boolean MAN = false;
    private static final boolean NOT_MAN = true;
    private static final boolean LOSE = true;
    private static final boolean NOT_LOSE = false;
    private Long id;
    //卡号
    private Long cardNum;
    //姓名
    private String name;
    //电话
    private String tel;
    //密码
    private String password;
    //性别(尊称)默认男士
    private boolean sex = MAN;
    //丢失状态 默认是未丢失
    private boolean lose = NOT_LOSE;
    //出生时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    //qq
    private String qq;
    //微信
    private String weixin;
    //邮箱
    private String email;
    //积分 (新创建的会员默认赠送100积分)
    private int integral = 100;
    //余额  默认为0
    private BigDecimal balance = new BigDecimal("0");
    //会员地址
    private String address;
    private MemberGrade memberGrade;
    private MGroup group;
}